<template>
    <div>
        <div id="example1">
            <h1 v-if="awesome">Vie is awesome</h1>
            <h1 v-else>Oh no 😢</h1>
        </div>
        <div id="example2">
            <div v-if="Math.random() > 0.5">
                Now you see me
            </div>
            <div v-else>
                Now you don`t
            </div>
        </div>
        <div id="example3">
            <div v-if="type === 'A'">
                A
            </div>
            <div v-else-if="type === 'B'">
                B
            </div>
            <div v-else-if="type === 'C'">
                C
            </div>
            <div v-else>
                Not A/B/C
            </div>
        </div>
    </div>
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'

@Component({})
export default class ConditionalRenderingexample extends Vue {
    name = '';
    awesome = false;
    ok = false;
    type = "B";
}
</script>

<style scoped>

</style>
